// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-04-24 18:08:26
// 生成路径: api/v1/business/books.go
// 生成人：周志雄
// desc:场次座位预定相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package business

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

// BooksSearchReq 分页请求参数
type BooksSearchReq struct {
	g.Meta    `path:"/list" tags:"场次座位预定" method:"get" summary:"场次座位预定列表"`
	Id        string `p:"id"`                                                           //主键ID
	ShowingId string `p:"showingId" v:"showingId@integer#场次ID需为整数"`                     //场次ID
	SeatId    string `p:"seatId" v:"seatId@integer#座位ID需为整数"`                           //座位ID
	Status    string `p:"status" v:"status@integer#预订状态（1已选、2未选、3已预留）需为整数"`             //预订状态（1已选、2未选、3已预留）
	OrderId   string `p:"orderId"`                                                      //订单号
	CreatedAt string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
	commonApi.PageReq
	commonApi.Author
}

// BooksSearchRes 列表返回结果
type BooksSearchRes struct {
	g.Meta `mime:"application/json"`
	commonApi.ListRes
	List []*model.BooksListRes `json:"list"`
}

// BooksAddReq 添加操作请求参数
type BooksAddReq struct {
	g.Meta `path:"/add" tags:"场次座位预定" method:"post" summary:"场次座位预定添加"`
	commonApi.Author
	ShowingId int    `p:"showingId" v:"required#场次ID不能为空"`
	SeatId    int    `p:"seatId" v:"required#座位ID不能为空"`
	Status    int    `p:"status" v:"required#预订状态（1已选、2未选、3已预留）不能为空"`
	OrderId   string `p:"orderId" `
}

// BooksAddRes 添加操作返回结果
type BooksAddRes struct {
	commonApi.EmptyRes
}

// BooksEditReq 修改操作请求参数
type BooksEditReq struct {
	g.Meta `path:"/edit" tags:"场次座位预定" method:"put" summary:"场次座位预定修改"`
	commonApi.Author
	Id        int    `p:"id" v:"required#主键ID不能为空"`
	ShowingId int    `p:"showingId" v:"required#场次ID不能为空"`
	SeatId    int    `p:"seatId" v:"required#座位ID不能为空"`
	Status    int    `p:"status" v:"required#预订状态（1已选、2未选、3已预留）不能为空"`
	OrderId   string `p:"orderId" `
}

// BooksEditRes 修改操作返回结果
type BooksEditRes struct {
	commonApi.EmptyRes
}

// BooksGetReq 获取一条数据请求
type BooksGetReq struct {
	g.Meta `path:"/get" tags:"场次座位预定" method:"get" summary:"获取场次座位预定信息"`
	commonApi.Author
	Id int `p:"id" v:"required#主键必须"` //通过主键获取
}

// BooksGetRes 获取一条数据结果
type BooksGetRes struct {
	g.Meta `mime:"application/json"`
	*model.BooksInfoRes
}

// BooksDeleteReq 删除数据请求
type BooksDeleteReq struct {
	g.Meta `path:"/delete" tags:"场次座位预定" method:"delete" summary:"删除场次座位预定"`
	commonApi.Author
	Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
}

// BooksDeleteRes 删除数据返回
type BooksDeleteRes struct {
	commonApi.EmptyRes
}

// 选座位请求
type ChooseSeatsReq struct {
	g.Meta `path:"/delete" tags:"场次座位预定" method:"post" summary:"选择座位"`
	commonApi.Author
	SeatIds []int64 `p:"seatIds" v:"required#座位ID不能为空"`
}

// 选座位响应
type ChooseSeatsRes struct {
	commonApi.EmptyRes
}
